<script setup lang="ts">
defineProps<{
  modelValue: number
  str: string
  flag: boolean
}>()
const emits = defineEmits<{
  (e: 'update:modelValue', v: number): void
  (e: 'update:str', v: string): void
  (e: 'update:flag', v: boolean): void
}>()
</script>
<template>
  <div>
    我是子组件 - {{ modelValue }} {{ str }} {{ flag }}
    <button @click="emits('update:modelValue', 10)">修改</button>
    <button @click="emits('update:str', 'xyz')">修改str</button>
    <button @click="emits('update:flag', false)">修改布尔值</button>
  </div>
</template>

<style scoped></style>
